package com.dp.appi.jsonp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.AbstractCachingViewResolver;

import java.util.Locale;

/**
 * Created by xiaoji on 2015/3/24.
 */
@Component
public class JsonpViewResolver extends AbstractCachingViewResolver {

//    private String jsonpSuffix=".jsonp";
    @Autowired
    private JsonpView jsonView;

    @Override
    protected View loadView(String viewName, Locale locale) throws Exception {
//        View view = null;
////        if (viewName.endsWith(jsonpSuffix)){
//            view =jsonView;
////        }
        return jsonView;
    }
}
